package Hiber;

import org.hibernate.Session;

/**
 * Generic session manager
 * @author oz
 * @author Shinichi
 * @param <T>
 */
public class Manager<T> {
	 private Session session ;
	 public Manager(Session session) {
	  if(session == null)
	    throw new 
	      RuntimeException("Invalid session object.");
	  this.session = session;
	 }
	public void save(T def){
		session.save(def);
	}
	public void update(T def){
		session.update(def);
	}
	public void delete(T def){
		session.delete(def);
	}
}
